#include "progressbar.h"

void progressbar()
{
    char bar[102] = {0};
    char a[4] = {'|','\\','-','/'};

    int i = 0;
    for(i = 0; i < 100;)
    {
        bar[i++] = '=';
        bar[i] = '>';
        printf("[%-101s][%d%%][%c]\r",bar,i,a[i%4]);
        fflush(stdout);
        usleep(100000);
    }

    printf("\n");
}
